<template>
  <div class="comprehensive">
    <div class="content_comprehensive">
      <!-- <div class="t-title">办理中心</div> -->
      <el-button-group class="radioBtn" v-model="radioBtn.select">
        <el-button @click="radioBtnClick('报名')" class="first" v-if="hasApi('clueEnroll')">
          <img class="btnIco" src="../../assets/img/processing_center/enroll.png">
          <span class="btnTxt" style="color:rgb(250,119,119);">报名</span>
        </el-button>
        <el-button @click="radioBtnClick('续费')" v-if="hasApi('renew')">
          <img class="btnIco" src="../../assets/img/processing_center/renew.png">
          <span class="btnTxt" style="color:rgb(135,193,67);">续费</span>
        </el-button>
        <el-button @click="radioBtnClick('转班')" v-if="hasApi('changeClass')">
          <img class="btnIco" src="../../assets/img/processing_center/changeclass.png">
          <span class="btnTxt" style="color:rgb(56,133,248);">转班</span>
        </el-button>
        <el-button  @click="radioBtnClick('退费')" v-if="hasApi('refund')">
          <img class="btnIco" src="../../assets/img/processing_center/refund.png">
          <span class="btnTxt" style="color:rgb(250,119,119);">退费</span>
        </el-button>
        <el-button disabled @click="radioBtnClick('交订金')" v-if="hasApi('payMoney')">
          <img class="btnIco" src="../../assets/img/processing_center/deposit.png">
          <span class="btnTxt" style="color:rgb(135,193,67);">交订金</span>
        </el-button>
        <el-button @click="radioBtnClick('购买商品')" class="last" v-if="hasApi('goodsBuy')">
          <img class="btnIco" src="../../assets/img/processing_center/buy.png">
          <span class="btnTxt" style="color:rgb(56,133,248);">商品购买</span>
        </el-button>
        <el-button @click="radioBtnClick('餐费购买')" class="last" v-if="hasApi('saveMeals')">
          <img class="btnIco" src="../../assets/img/processing_center/mealfee_icon.png">
          <span class="btnTxt" style="color:rgb(250,119,119);">餐费购买</span>
        </el-button>
      </el-button-group>
      <div class="contentProcessingCenter">
        <div class="latesttitle">最新收退情况：</div>
        <template>
          <el-table
            :data="latestMoneyData"
            stripe
            style="font-size:0.16rem;width: calc( 100% - 0.64rem);margin-left: 0.32rem;"
            class="latestTable"
            max-height="540"
          >
            <el-table-column prop="date" align="center" label="交易时间"></el-table-column>
            <el-table-column prop="money" align="center" label="金额">
              <template slot-scope="scope">
                <span v-if="!scope.row.isRefund" style="color:rgb(25,177,13);">{{scope.row.money}}</span>
                <span v-else  style="color:rgb(255,20,20);">{{scope.row.money}}</span>
              </template>
              <!-- <template slot-scope="scope">
                <span v-if="scope.row.accountType!=2" style="color:rgb(25, 177, 13);">{{'+￥'+scope.row.accountMoney}}</span>
                <span v-else style="color:rgb(255,20,20);">{{'-￥'+scope.row.accountMoney}}</span>
              </template> -->
            </el-table-column>
            <el-table-column prop="type" align="center" label="类型"></el-table-column>
            <el-table-column prop="operator" align="center" label="操作人"></el-table-column>
            <el-table-column prop="operatorTime" align="center" label="操作时间"></el-table-column>
          </el-table>
        </template>
        <!-- 弹窗 -->
        <el-dialog
          class="commonDialog"
          :modal="false"
           :close-on-click-modal="commonDialog.clickmodal"
          :title="commonDialog.title"
          :visible.sync="commonDialog.visible"
          v-loading.fullscreen.lock="commonDialog.loading"
          element-loading-background="rgba(0, 0, 0, 0.1)"
         >
          <div class="enroll" v-if="commonDialog.contentshow[0]">
            <div class="txt">选择报名学员</div>
            <div class="rowbox">
              <el-input
                class="inputtxt"
                style="font-size:0.16rem;"
                placeholder="请输入关键字"
                v-model="commonDialog.enroll.inputtxt"
                clearable
                @keyup.enter.native="dialog_enroll_query"
                ref="commonDialog_enroll_inputtxt"
              ></el-input>
              <el-button class="resetElement" type="primary" @click="dialog_enroll_query">查询</el-button>
              <el-button class="resetElement" type="primary" v-if="hasApi('clueAdd')" @click="dialog_enroll_addstudent">新增学员</el-button>
            </div>
            <template>
              <el-table
                :data="commonDialog.enroll.tableData"
                border
                max-height="240"
                style="width: 100%;font-size:0.16rem;"
                class="table"
                highlight-current-row
                @current-change="dialog_enroll_handleCurrentChange"
              >
                <el-table-column prop="student" label="学员"></el-table-column>
                <el-table-column prop="age" label="年龄"></el-table-column>
                <el-table-column prop="phone" label="电话"></el-table-column>
              </el-table>
            </template>
            <div class="rowbox bottom">
              <el-button class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                 class="resetElement" type="primary"
                :disabled="commonDialog.enroll.enrollbtnDisable"
                @click="dialog_enroll_btnEnrollClick"
              >报名</el-button>
            </div>
          </div>
          <div class="renew" v-else-if="commonDialog.contentshow[1]">
            <div class="txt">选择续费学员</div>
            <div class="rowbox">
              <el-input
                class="inputtxt"
                style="font-size:0.16rem;"
                placeholder="请输入关键字"
                v-model="commonDialog.renew.inputtxt"
                clearable
                @keyup.enter.native="dialog_renew_query"
                ref="commonDialog_renew_inputtxt"
              ></el-input>
              <el-button class="resetElement" type="primary" @click="dialog_renew_query">查询</el-button>
              <!-- <el-button @click="dialog_enroll_addstudent">新增学员</el-button> -->
            </div>
            <template>
              <el-table
                :data="commonDialog.renew.tableData"
                border
                max-height="240"
                style="width: 100%;font-size:0.16rem;"
                class="table"
                highlight-current-row
                @current-change="dialog_renew_handleCurrentChange"
              >
                <el-table-column prop="student" label="学员"></el-table-column>
                <el-table-column prop="age" label="年龄"></el-table-column>
                <el-table-column prop="phone" label="电话"></el-table-column>
              </el-table>
            </template>
            <div class="rowbox" v-if="commonDialog.tooMuchShow" style="text-align:right;margin:0.08rem 0;">
              <span>搜索结果过多，只展示前{{commonDialog.tooMuchSize}}条</span>
            </div>
            <div class="rowbox bottom">
              <el-button  class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                 class="resetElement" type="primary"
                :disabled="commonDialog.renew.renewbtnDisable"
                @click="dialog_renew_btnRenewClick"
              >续费</el-button>
            </div>
          </div>
          <div class="changeclass" v-else-if="commonDialog.contentshow[2]">
            <div class="txt">选择转班学员</div>
            <template>
              <el-select
                class="studentselect"
                style="font-size:0.16rem;"
                v-model="commonDialog.changeclass.curstudent"
                filterable
                placeholder="请输入学员姓名"
                @change="dialog_changeclass_studentSelect"
              >
                <el-option
                  v-for="item in commonDialog.changeclass.studentData"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </template>
            <div class="txt">学员班级信息</div>
            <template>
              <el-radio-group
                class="classselect"
                v-model="commonDialog.changeclass.curclass"
                @change="dialog_changeclass_classSelectChange"
                v-if="commonDialog.changeclass.classData.length>0"
              >
                <div style="margin-top:0.1rem;" v-for="(row,i) in commonDialog.changeclass.classData" :key="i">
                  <!-- <el-radio :label="row.key">{{row.className}}/{{row.courseName}}</el-radio> -->
                  <el-radio :label="row.key">{{row.rowlabelContent}}</el-radio>
                </div>
              </el-radio-group>
              <div v-else style="margin-left: 45%;color: #888888;
                margin-top: 0.1rem;margin-bottom: 0.1rem;">无数据</div>
            </template>
            
            <div class="rowbox bottom">
              <el-button  class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                :disabled="commonDialog.changeclass.nextbtnDisable"
                 class="resetElement" type="primary"
                @click="dialog_changeclass_btnNextStepClick"
              >下一步</el-button>
            </div>
          </div>
          
          <div class="refund" v-else-if="commonDialog.contentshow[3]">
            <el-select
              class="typeselect"
              style="font-size:0.16rem;"
              popper-class="typeselect-dropdown"
              v-model="commonDialog.refund.curtype"
              placeholder="请选择退费类型"
              @change="dialog_refund_typeSelect"
            >
              <el-option key="1" label="报名退费" value="报名退费"></el-option>
              <el-option key="2" label="商品退费" value="商品退费"></el-option>           
              <!--<el-option key="3" label="退订金" value="退订金"></el-option>-->
              <el-option key="4" label="餐费退费" value="餐费退费"></el-option>

            </el-select>
            <el-select
              class="studentselect"
              style="font-size:0.16rem;"
              v-model="commonDialog.refund.curstudent"
              filterable
              placeholder="请输入学员信息"
              @change="dialog_refund_studentSelect"
            >
              <el-option
                v-for="item in commonDialog.refund.studentData"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >           
              </el-option>
            </el-select>
            <div class="rowbox bottom">
              <el-button  class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                :disabled="commonDialog.refund.nextbtnDisable"
                 class="resetElement" type="primary"
                @click="dialog_refund_btnNextStepClick"
              >下一步</el-button>
            </div>
          </div>
          <div class="deposit" v-else-if="commonDialog.contentshow[4]">
            <div class="txt">选择交订金学员</div>
            <div class="rowbox">
              <el-input
                class="inputtxt"
                style="font-size:0.16rem;"
                placeholder="请输入关键字"
                v-model="commonDialog.deposit.inputtxt"
                clearable
                @keyup.enter.native="dialog_deposit_query"
              ></el-input>
              <el-button class="resetElement" type="primary" @click="dialog_deposit_query">查询</el-button>
              <el-button class="resetElement" type="primary" @click="dialog_deposit_addstudent">新增学员</el-button>
            </div>
            <template>
              <el-table
                :data="commonDialog.deposit.tableData"
                border
                max-height="240"
                style="width: 100%;font-size:0.16rem;"
                class="table"
                highlight-current-row
                @current-change="dialog_deposit_handleCurrentChange"
              >
                <el-table-column prop="student" label="学员"></el-table-column>
                <el-table-column prop="age" label="年龄"></el-table-column>
                <el-table-column prop="phone" label="电话"></el-table-column>
              </el-table>
            </template>
            <div class="rowbox bottom">
              <el-button  class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                 class="resetElement" type="primary"
                :disabled="commonDialog.deposit.depositbtnDisable"
                @click="dialog_deposit_btnEnrollClick"
              >下一步</el-button>
            </div>
          </div>
          
          <div class="renew" v-else-if="commonDialog.contentshow[5]">
            <div class="txt">选择购买学员</div>
            <div class="rowbox">
              <el-input
                class="inputtxt"
                style="font-size:0.16rem;"
                placeholder="请输入关键字"
                v-model="commonDialog.renew.inputtxt"
                clearable
                @keyup.enter.native="dialog_renew_query"
                ref="commonDialog_renew_inputtxt"
              ></el-input>
              <el-button class="resetElement" type="primary" @click="dialog_renew_query">查询</el-button>
              <!-- <el-button @click="dialog_enroll_addstudent">新增学员</el-button> -->
            </div>
            <template>
              <el-table
                :data="commonDialog.renew.tableData"
                border
                max-height="240"
                style="width: 100%;font-size:0.16rem;"
                class="table"
                highlight-current-row
                @current-change="dialog_renew_handleCurrentChange"
              >
                <el-table-column prop="student" label="学员"></el-table-column>
                <el-table-column prop="age" label="年龄"></el-table-column>
                <el-table-column prop="phone" label="电话"></el-table-column>
              </el-table>
            </template>
            <div class="rowbox" v-if="commonDialog.tooMuchShow" style="text-align:right;margin:0.08rem 0;">
              <span>搜索结果过多，只展示前{{commonDialog.tooMuchSize}}条</span>
            </div>
            <div class="rowbox bottom">
              <el-button  class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                 class="resetElement" type="primary"
                :disabled="commonDialog.renew.renewbtnDisable"
                @click="dialog_goodsBuy_Click"
              >下一步</el-button>
            </div>
          </div>
          
          <div class="renew" v-else-if="commonDialog.contentshow[6]">
            <div class="txt">选择购买学员</div>
            <div class="rowbox">
              <el-input
                class="inputtxt"
                style="font-size:0.16rem;"
                placeholder="请输入关键字"
                v-model="commonDialog.renew.inputtxt"
                clearable
                @keyup.enter.native="dialog_renew_query"
                ref="commonDialog_renew_inputtxt"
              ></el-input>
              <el-button class="resetElement" type="primary" @click="dialog_renew_query">查询</el-button>
              <!-- <el-button class="resetElement" type="primary" @click="dialog_enroll_addstudent">新增学员</el-button> -->
            </div>
            <template>
              <el-table
                :data="commonDialog.renew.tableData"
                border
                max-height="240"
                style="width: 100%;font-size:0.16rem;"
                class="table"
                highlight-current-row
                @current-change="dialog_renew_handleCurrentChange"
              >
                <el-table-column prop="student" label="学员"></el-table-column>
                <el-table-column prop="age" label="年龄"></el-table-column>
                <el-table-column prop="phone" label="电话"></el-table-column>
              </el-table>
            </template>
            <div class="rowbox" v-if="commonDialog.tooMuchShow" style="text-align:right;margin:0.08rem 0;">
              <span>搜索结果过多，只展示前{{commonDialog.tooMuchSize}}条</span>
            </div>
            <div class="rowbox bottom">
              <el-button  class="resetElement" type="primary" @click="closeCommonDialog">取消</el-button>
              <el-button
                 class="resetElement" type="primary"
                :disabled="commonDialog.renew.renewbtnDisable"
                @click="dialog_mealfeeBuy_Click"
              >下一步</el-button>
            </div>
          </div>
        </el-dialog>
      </div>
    </div>

    <!-- 引入其他组件 -->
    <!-- 报名 -->
    <clueAdd class="popup" ref="clueAdd" @callback="dialog_enroll_addstudent_callback"></clueAdd>
    <clueEnroll class="popup" ref="clueEnroll" @callback="dialog_enroll_closeEnroll"></clueEnroll>
    <!--转班-->
    <changeClass :studentdetailprop="commonDialog.changeclass.studentdetailprop"
     @backselect="radioBtnClick('转班')" @suceess="updateLatestMoneyData"></changeClass>
    <!--退课-->
    <!-- <dropClass :studentdetailprop="commonDialog.refund.studentdetailprop"></dropClass> -->

    <refundpopup ref="refundpopup" :refundpopup="commonDialog.refund.refundpopup" @callback="dialog_enroll_closeEnroll"></refundpopup>


    <!-- 交订金 -->
    <payEarnest class="popup" ref="payEarnest" @callback="updateLatestMoneyData"></payEarnest>
    
    <!--商品购买-->
    <goodsBuy ref="goodsBuy" @callback="closeGoodsBuy"></goodsBuy>
    
    <!--商品退款-->
    <goodsRefund ref="goodsRefund" @callback="closeGoodsRefund" @update="updateLatestMoneyData"></goodsRefund>

 		
 		<!--餐费购买-->
 		<mealfeebuy ref="mealfeebuy" @callback="closemealfeebuy" @update="updateLatestMoneyData" @backselect="radioBtnClick('餐费购买')"></mealfeebuy>
 		
 		<!--餐费退费-->
 		<mealrefund ref="mealrefund" @callback="closemealrefund" @update="updateLatestMoneyData"></mealrefund>

  	
  	<!--订金退款-->
    <earnestRefund ref="earnestRefund" @callback="closeEarnestRefund" @update="updateLatestMoneyData"></earnestRefund>

  </div>
</template>

<script>
import { mapState, mapGetters, mapActions } from "vuex"; //先要引入
import clueAdd from "../clue_manage/subpage/clue_add"; //报名：新增线索/新增学员
import clueEnroll from "../clue_manage/subpage/clue_enroll"; //报名
import changeClass from "../education_manage/common/changeClass"; //转班
// import dropClass from '../education_manage/common/dropClass'//退费
import refundpopup from "./common/refundpopup";
import payEarnest from "../clue_manage/subpage/pay_earnest"; //交订金
import goodsBuy from "./common/goods_buy"; //商品购买
import goodsRefund from "./common/goods_refund"; //商品退费

import mealfeebuy from "./common/buy_mealfee"; //餐费购买
import mealrefund from "./common/mealrefund"; //餐费退费
import earnestRefund from "./common/earnest_refund"; //商品退费

export default {
  components: { clueAdd, clueEnroll, changeClass, payEarnest, 
  				      refundpopup, goodsBuy, goodsRefund, earnestRefund ,mealfeebuy,mealrefund},


  data() {
    return {
      radioBtn: {
        select: ""
      },
      latestMoneyData: [],
      commonDialog: {
        tooMuchShow:false,
        tooMuchSize:20,
        title: "",
        clickmodal:false,
        loading: false,
        visible: false,
        contentshow: [],
        enroll: {
          inputtxt: "",
          tableData: [],
          clueDataList: null,
          selectClue: null,
          enrollbtnDisable: true
        },
        renew: {
          inputtxt: "",
          tableData: [],
          studentDataList: null,
          selectStudent: null,
          renewbtnDisable: true
        },
        changeclass: {
          curstudent: "",
          selectStudent: null,
          studentData: [],
          curclass: "",
          selectClass: null,
          nextbtnDisable: true,
          classData: [],
          studentdetailprop: null
        },
        refund: {
          curtype: "",
          curstudent: "",
          studentData: [],
          nextbtnDisable: true,
          studentdetailprop: null,
          refundpopup: {
            rem: window.rem,
            show: false,
            title: "费用详情",
            studentInfo: {
              studentName: "",
              parentName: "",
              phone: ""
            },
            tableSelect: {
              title: "请选择需退课的课程",
              table: {
                tbody: [],
                thead: []
              }
            },
            tableResult: {
              title: "退款结算",
              table: {
                tbody: [],
                thead: []
              },
              summarize: "已选0门课程，总计退费：￥0.00元"
            }
          }
        },
        deposit: {
          inputtxt: "",
          tableData: [],
          clueDataList: null,
          selectClue: null,
          depositbtnDisable: true
        },
        buy: {
          curstudent: "",
          studentData: [],
          nextbtnDisable: true
        }
      }
    };
  },
  methods: {
    /**初始化 */
    init() {
      // let userinfo=JSON.parse(tool.getItem(window.lsKey.user));
     
      this.campusId = this.$store.state.campusId;
      this.updateLatestMoneyData();
    },
    campusChange: function(campusId) {
      //校区改变
      this.campusId = campusId;
      this.init();
    },
    /**
     * 设置visible 
     */
    setVisible(){
    	this.commonDialog.visible=true;
    },
    /**更新最新收退费记录 */
    updateLatestMoneyData() {
      // console.log('列表刷新成功');
      let self = this;
      api
        .getLatestAccountRecord({
          currPage: 1,
          pageSize: 20,
          campusId: this.campusId
        })
        .then(function(d) {
          // console.log(d)
          if (d.result == "操作成功") {
            let list = d.list;
            self.latestMoneyData = [];
            for (let i = 0; i < list.length; i++) {
              let row = list[i];
              let money = row.realMoney || 0;
              let typename=tool.getDictNameByValue(row.billMode,'bill_mode');
              let isRefund=false;
              switch(row.billMode){
                case 1:{
                  // typename='报名';
                  money='￥'+money;
                  break;
                }
                case 2:{
                  // typename='退课程费';
                  money='-￥'+money;
                  isRefund=true;
                  break;
                }
                case 3:{
                  // typename='收订金';
                  money='￥'+money;
                  break;
                }
                case 4:{
                  // typename='退订金';
                  money='-￥'+money;
                  isRefund=true;
                  break;
                }
                case 5:{
                  // typename='退商品';
                  money='-￥'+money;
                  isRefund=true;
                  break;
                }
                case 6:{
                  // typename='买商品';
                  money='￥'+money;
                  break;
                }
                case 7:{
                  // typename='买餐费';
                  money='￥'+money;
                  break;
                }
                case 8:{
                  // typename='退餐费';
                  money='-￥'+money;
                  isRefund=true;
                  break;
                }
              }
              
              self.latestMoneyData.push({
                date: (row.orderTime||"").substr(0,10),
                money: money,
                isRefund:isRefund,
                type: typename,
                operator: row.createUserName,
                operatorTime:row.createTime
              });
            }
          }
        });
    },
    /**头部按钮点击 报名、续费转班等等 */
    radioBtnClick(d) {
      let txt = d;
      this.commonDialog.title = txt;
      this.commonDialog.visible = true;
      this.commonDialog.tooMuchShow=false;
      this.commonDialog.contentshow = [
        txt == "报名",
        txt == "续费",
        txt == "转班",
        txt == "退费",
        txt == "交订金",
        txt == "购买商品",
        txt == "餐费购买"
      ];
      this.commonDialog.addClueType = "";
      //续费 即报名
      // if(txt=='续费'){
      // 	this.commonDialog.contentshow[0]=true;
      // 	this.commonDialog.contentshow[1]=false;
      // }
      //清空上次数据
      //报名
      if (this.commonDialog.contentshow[0]) {
        this.commonDialog.enroll.inputtxt = "";
        this.commonDialog.enroll.tableData = [];
        this.commonDialog.enroll.enrollbtnDisable = true;
        this.commonDialog.addClueType = 0;
      }
      //续费
      if (this.commonDialog.contentshow[1]) {
        this.commonDialog.renew.inputtxt = "";
        this.commonDialog.renew.tableData = [];
        this.commonDialog.renew.renewbtnDisable = true;
        // this.commonDialog.addClueType=1;
      }
      
      //退费
      if (this.commonDialog.contentshow[3]) {
      	
        this.commonDialog.refund.curtype = "";
        this.commonDialog.refund.curstudent = "";
        
      }
      //交订金
      if (this.commonDialog.contentshow[4]) {
        this.commonDialog.deposit.inputtxt = "";
        this.commonDialog.deposit.tableData = [];
        this.commonDialog.deposit.depositbtnDisable = true;
        this.commonDialog.addClueType = 4;
      }
      //购买商品
      if (this.commonDialog.contentshow[5]) {
        this.commonDialog.renew.inputtxt = "";
        this.commonDialog.renew.tableData = [];
        this.commonDialog.renew.renewbtnDisable = true;
      }
      //餐费购买
      if (this.commonDialog.contentshow[6]) {
      	this.commonDialog.renew.inputtxt = "";
        this.commonDialog.renew.tableData = [];
        this.commonDialog.renew.renewbtnDisable = true;
      }

      //转班数据初始化
      if (this.commonDialog.contentshow[2]) {
        this.dialog_changeclass_dataInit();
      }
    },
    /**关闭弹窗 */
    closeCommonDialog() {
      this.commonDialog.visible = false;
    },
    /**报名弹窗-查询按钮点击 */
    dialog_enroll_query() {
      let self = this;
      let searchname = this.commonDialog.enroll.inputtxt;

      //验证规则
      var rules = [
        {
          judge: tool.judge("empty", searchname),
          focus: this.$refs.commonDialog_enroll_inputtxt,
          tips: "关键字不可为空！"
        }
      ];
      if (!tool.validate(rules)) {
        return;
      }
      let genderMatch=tool.getDictNameByValue(-100,'gender',false);
      this.commonDialog.enroll.tableData = [];
      this.commonDialog.loading = true;
      api
        .clueList({
          keyword: searchname,
          campusId: this.campusId,
          type: 0,
          clueStatus: "",
          courseId: "",
          intentionMode: "",
          visitTime: "",
          remark: "",
          channelId: "",
          age: "",
          createTime: "",
          assignDate: "",
          currPage: -1,
          // pageSize: 10
        })
        .then(function(data) {
          // console.log(data)
          let clueList = data.list;
          self.commonDialog.enroll.clueDataList = clueList;
          let now = new Date();
          let year = now.getFullYear(),
            month = now.getMonth() + 1,
            day = now.getDate();
          for (let i = 0; i < clueList.length; i++) {
            let row = clueList[i];
            if(row.clueStatus==1 || row.clueStatus==6 || row.clueStatus==7)continue;//待跟进、已报名的不可再报名
            let phone = "";
            if (row.parentData && row.parentData.length > 0) {
              phone = row.parentData[0].phone;
            }
            //birthday "2019-02-01"
            //方法一
            // let birthday=row.birthday.split('-');
            // let dy=year-Number(birthday[0]),dm=month-Number(birthday[1]);
            // let rm=dy*12+dm;
            // let sui=(parseInt(rm/12)+'岁');sui=sui=='0岁'?'':sui;
            // let yue=(rm%12)+'个月';
            // let age=sui+yue;
            //方法二
            let gender=genderMatch[row.gender];
            gender=gender?("(" +gender+ ")"):"";
            let age = tool.minusDate(row.birthday);
            self.commonDialog.enroll.tableData.push({
              student:row.realName + gender,
              age: age,
              phone: phone,
              key: i
            });
          }
          //清空上次选择
          self.commonDialog.enroll.selectClue = null;
          self.commonDialog.enroll.enrollbtnDisable = true;
          self.commonDialog.loading = false;
        })
        .catch(function(e) {
          self.commonDialog.loading = false;
        });
    },
    /**报名弹窗-表格选中 */
    dialog_enroll_handleCurrentChange(currentRow) {
      if (!currentRow) return;
      let index = currentRow.key;
      this.commonDialog.enroll.selectClue = this.commonDialog.enroll.clueDataList[
        index
      ];
      this.commonDialog.enroll.enrollbtnDisable = false;
    },
    /**报名弹窗-新增学员 */
    dialog_enroll_addstudent() {
      this.$refs.clueAdd.init();
    },
    /**报名弹窗-新增学员 添加成功后 callback 0
     * 交订金弹窗-新增学员 添加成功后 callback 4
     */
    dialog_enroll_addstudent_callback(d) {
      if (this.commonDialog.addClueType === 0) {
        let clueEnroll = this.$refs.clueEnroll;
        d.name = "报名";
        d.type = "办理中心";
        clueEnroll.init(d);
        this.closeCommonDialog();
      }
      // else if(this.commonDialog.addClueType===1){
      // 	let clueEnroll=this.$refs.clueEnroll;
      // 	clueEnroll.init(d);
      // }
      else if (this.commonDialog.addClueType === 4) {
        let payEarnest = this.$refs.payEarnest;
        payEarnest.init(d);
        this.closeCommonDialog();
      }
      // console.log('dialog_enroll_addstudent_callback')
    },
    /**报名弹窗-报名按钮点击 */
    dialog_enroll_btnEnrollClick() {
      let self = this;
      let clueEnroll = this.$refs.clueEnroll;
      this.commonDialog.enroll.selectClue.name = "报名";
      this.commonDialog.enroll.selectClue.type = "办理中心";
      clueEnroll.init(this.commonDialog.enroll.selectClue);
      self.closeCommonDialog();
      // self.commonDialog.loading=false;
    },
    /**报名弹窗-报名组件成功callback */
    dialog_enroll_closeEnroll() {
      this.updateLatestMoneyData();
      // console.log('dialog_enroll_closeEnroll')
    },
    //续费
    /**续费弹窗-查询 */
    dialog_renew_query() {
      let self = this;
      let searchname = this.commonDialog.renew.inputtxt;

      //验证规则
      var rules = [
        // {
        // 	judge : tool.judge("name",searchname),
        // 	focus : this.$refs.commonDialog_enroll_inputtxt,
        // 	tips : searchname
        // },
        {
          judge: tool.judge("empty", searchname),
          focus: this.$refs.commonDialog_renew_inputtxt,
          tips: "关键字不可为空！"
        }
      ];
      if (!tool.validate(rules)) {
        return;
      }
      let genderMatch=tool.getDictNameByValue(-100,'gender',false);
      this.commonDialog.renew.tableData = [];
      this.commonDialog.loading = true;
      api
        .getCampusStudentList({ 
          campusId: this.campusId,
          keyword: searchname,
          classId:'',
          courseId:'',
          classStatusMode: '',
          currPage:1,
          pageSize:this.commonDialog.tooMuchSize
      })
        .then(function(d) {
          if (d.result == "操作成功") {
            let studentList = d.listStudent.records;
            self.commonDialog.tooMuchShow=false;
            if(Number(d.listStudent.total)>self.commonDialog.tooMuchSize){
              self.commonDialog.tooMuchShow=true;
            }
            self.commonDialog.renew.studentDataList = studentList;
            let now = new Date();
            let year = now.getFullYear(),
              month = now.getMonth() + 1,
              day = now.getDate();
            for (let i = 0; i < studentList.length; i++) {
              let row = studentList[i];
              let phone = row.phone;
              //birthday "2019-02-01
              //方法二
              let age = tool.minusDate(row.birthday);
              let gender=genderMatch[row.genderMode]||"";
              gender=gender?("(" +gender+ ")"):"";
              self.commonDialog.renew.tableData.push({
                student:row.realName +gender,
                age: age,
                phone: phone,
                key: i
              });
            }
            //清空上次选择
            self.commonDialog.renew.selectStudent = null;
            self.commonDialog.renew.renewbtnDisable = true;
          }
          self.commonDialog.loading = false;
        })
        .catch(function() {
          self.commonDialog.loading = false;
        });
    },
    /**续费弹窗-表格选中 */
    dialog_renew_handleCurrentChange(currentRow) {
      if (!currentRow) return;
      let index = currentRow.key;
      this.commonDialog.renew.selectStudent = this.commonDialog.renew.studentDataList[
        index
      ];
      this.commonDialog.renew.renewbtnDisable = false;
    },
    /**续费弹窗-报名按钮点击 */
    dialog_renew_btnRenewClick() {
      let self = this;
      let clueEnroll = this.$refs.clueEnroll;
      api
        .clueInfo({
          clueId: self.commonDialog.renew.selectStudent.clueId
        })
        .then(function(data) {
          let clue = data.info;
          clue.studentId = self.commonDialog.renew.selectStudent.studentId;
          clue.name = "续费";
          clue.type='办理中心';
          clue.courseList = self.commonDialog.renew.selectStudent.courseList;
          clueEnroll.init(clue);
          self.closeCommonDialog();
        });
    },
    dialog_goodsBuy_Click() {
    	//获取选中的学生
    	var student = this.commonDialog.renew.selectStudent;
    	//打开商品购买页,关闭当前页
    	this.$refs.goodsBuy.init(student);
    	this.closeCommonDialog();
    },
    /**
     * 餐费购买
     */
    dialog_mealfeeBuy_Click(){
      this.closeCommonDialog();
    	//获取选中的学生
    	var student = this.commonDialog.renew.selectStudent;
    	this.$refs.mealfeebuy.init(student);
    },
    /**转班弹窗-初始化 */
    dialog_changeclass_dataInit() {
      let self = this;
      self.commonDialog.changeclass.classData = [];
      self.commonDialog.changeclass.curstudent = null;
      this.commonDialog.changeclass.nextbtnDisable = true;
      api.getAllStudents({ campusId: this.campusId}).then(function(d){
      	
      	 if (d.result == "操作成功") {
            self.commonDialog.changeclass.studentData = [];
          	let students = d.list;
            for (let i = 0; i < students.length; i++) {
              students[i].value = students[i].studentId;
              students[i].label = students[i].realName;
            }       
            self.commonDialog.changeclass.studentData = students;
          }
      	
      });
    },
    /**转班弹窗-学生选择 */
    dialog_changeclass_studentSelect(d) {
    	let self = this;
    	for(let i=0;i<this.commonDialog.changeclass.studentData.length;i++){
    		if(d==this.commonDialog.changeclass.studentData[i]["studentId"]){
    			this.commonDialog.changeclass.selectStudent = this.commonDialog.changeclass.studentData[i];
    		}
      }
			api.getClassListBystudentIdChange({studentId:d}).then(function(data){
				 let classData = [];
	       for (let i = 0; i < data.list.length; i++) {
          let row=data.list[i];
          row.key = i;
          if(row.classLevel == 2)continue;//屏蔽全日制退课	
          let rowlabelContent='';
          if(row.courseName&&row.className){
            rowlabelContent=row.className+'/'+row.courseName;
          }
          else{
            rowlabelContent=row.className||row.courseName;
          }
          row.rowlabelContent = rowlabelContent;
          classData.push(row);
	       }
	       self.commonDialog.changeclass.classData = classData;
	       self.commonDialog.changeclass.curclass = "";
			});
    },
    /**转班弹窗-选择班级课程 */
    dialog_changeclass_classSelectChange() {
      // console.log(this.commonDialog.changeclass.curclass)
      let index = this.commonDialog.changeclass.curclass;
      this.commonDialog.changeclass.selectClass = this.commonDialog.changeclass.classData[
        index
      ];
      this.commonDialog.changeclass.nextbtnDisable = false;
    },
    /**转班弹窗-下一步按钮点击 */
    dialog_changeclass_btnNextStepClick() {
      let row = this.commonDialog.changeclass.selectClass;
      if(!row){
        this.$message({
          type:'warning',
          message:'所选学员信息为空！'
        });
        return;
      }
      // debugger
      let item = this.commonDialog.changeclass.selectStudent;
      this.commonDialog.changeclass.studentdetailprop = item;
      // let studentId='';
      if(item.studentParentEntityList&&item.studentParentEntityList.length>0){
        let parentobj=item.studentParentEntityList[0];
        this.commonDialog.changeclass.studentdetailprop.parentName=parentobj.parentName;
        this.commonDialog.changeclass.studentdetailprop.phone=parentobj.phone;
        // studentId=item[0].studentId;
      }
      // debugger
      let paras = { campusId: this.$store.state.campusId,
        studentCourseId:row.studentCourseId,
        classId:row.classId ,
        studentId:item.studentId
      };
      this.$store.dispatch("changeClass/getCourselist", paras);

      this.commonDialog.visible=false;
    },
    /**退费弹窗-类型选择 */
    dialog_refund_typeSelect(d) {
    	
      this.commonDialog.refund.curstudent = "";
      this.commonDialog.refund.nextbtnDisable = true;
      this.commonDialog.refund.studentData = [];
      let self = this;
      
      if (this.commonDialog.refund.curtype == "报名退费") {
        
        //获取所有学员
        api.getAllStudents({ campusId: this.campusId}).then(function(d) {
          if (d.result == "操作成功") {
          	//console.log(d)
          //  let students = d.listStudent;
          	let students = d.list;
            for (let i = 0; i < students.length; i++) {
              students[i].value = students[i].studentId;
              students[i].label = students[i].realName;
            }
          //  console.log(students)
            //过滤非待上课、上课中的课程
            
		        // for(let i=0;i<students.length;i++){
		        // 	let courseList=[];
		        // 	let studentcourse = students[i].courseList;
		        	
		        // 	for(let j =0;j<studentcourse.length;j++){
		        // 		if(studentcourse[j]["courseStatus"]<=2){
		        // 			courseList.push(studentcourse[j]);
		        // 		}
		        // 	}		 
		        // 	students[i].courseList = courseList;
		        // }
            
            self.commonDialog.refund.studentData = students;
          }
        });
      } else if (this.commonDialog.refund.curtype == "商品退费") {
        api.getAllStudents({ campusId: this.campusId }).then(function(d) {
          if (d.result == "操作成功") {
            let students = d.list;
            for (let i = 0; i < students.length; i++) {
              students[i].value = students[i].studentId;
              students[i].label = students[i].realName;
            }
            self.commonDialog.refund.studentData = students;
          }
        });
      } else if(this.commonDialog.refund.curtype == "餐费退费"){
      	let self = this;
      	api.getAllStudents({ campusId: this.campusId }).then(function(d) {
          if (d.result == "操作成功") {
            let students = d.list;
            for (let i = 0; i < students.length; i++) {
              students[i].value = students[i].studentId;
              students[i].label = students[i].realName;
            }
            self.commonDialog.refund.studentData = students;
          }
        });
      }else {
        //订金退费
        api.getAllStudents({ campusId: this.campusId }).then(function(d) {
          if (d.result == "操作成功") {
            let students = d.list;
            for (let i = 0; i < students.length; i++) {
              students[i].value = students[i].studentId;
              students[i].label = students[i].realName;
            }
            self.commonDialog.refund.studentData = students;
          }
        });
      }
    },
    /**退费弹窗-学员信息填入 */
    dialog_refund_studentSelect(d) {
      // if(this.commonDialog.refund.curtype!=''){
      // 	this.commonDialog.refund.selectStudent=this.commonDialog.refund.studentData[d];
      // 	this.commonDialog.refund.nextbtnDisable=false;
      // 	// console.log(this.commonDialog.refund.selectStudent)
      // }
      //alert(d)
     // console.log(this.commonDialog.refund.studentData)
     
      let selectStudent;
      for(let i=0;i<this.commonDialog.refund.studentData.length;i++){
      	let Student = this.commonDialog.refund.studentData[i];
      	 if(d==Student["studentId"]){
      	   selectStudent = Student;
      	 }
      }
      
      if (this.commonDialog.refund.curtype == "报名退费") {
      	let paras = {studentId:selectStudent.studentId};
	      api.getCourseListByStudentId(paras).then(function(data){
	      	if(data.result=="操作成功"){
	      		let courselist = [];
	        	for(let j =0;j<data.listCourse.length;j++){     
                  // if(data.listCourse[j].courseType == 2)continue;//屏蔽全日制退课	
			        		if(data.listCourse[j]["courseStatus"]==1||data.listCourse[j]["courseStatus"]==2||data.listCourse[j]["courseStatus"]==5){
			        			courselist.push(data.listCourse[j]);
			        		}
			      }	
	      		selectStudent["courseList"] = courselist;
	      	}
	      	//console.log(data)
	      })
      }
      
      this.commonDialog.refund.selectStudent = selectStudent;
      this.commonDialog.refund.nextbtnDisable = false;
    },
    /**退费弹窗-下一步按钮 */
    dialog_refund_btnNextStepClick() {
    	
      let rem = this.commonDialog.refund.refundpopup.rem;
      let selectStudent = this.commonDialog.refund.selectStudent;
      //debugger
      if (this.commonDialog.refund.curtype == "报名退费") {
        let fields = getFieldByType(1);
        //过滤掉非待上课、上课中的课程
        if(!selectStudent.courseList)return;
        let refundpopup = {
          show: true,
          title: "退费",
          studentInfo: {
            studentName: selectStudent.realName,
            parentName: selectStudent.studentParentEntityList.length>0?selectStudent.studentParentEntityList[0].parentName:"",
            phone: selectStudent.studentParentEntityList.length>0?selectStudent.studentParentEntityList[0].phone:"",
            studentId:selectStudent.studentId
          },
          tableSelect: {
            title: "请选择需退课的课程",
            table: {
              tbody: selectStudent.courseList,
              thead: fields.tableSelect
            }
          },
          tableResult: {
            title: "退款结算",
            table: {
              tbody: [],
              thead: fields.tableResult
            },
            summarize: "已选0门课程，总计退费：￥0.00元"
          }
        };
        this.$refs.refundpopup.updateByData(refundpopup);
        this.commonDialog.visible = false;
      } else if (this.commonDialog.refund.curtype == "商品退费") {
      	//打开商品退费页面
      	this.$refs.goodsRefund.init(selectStudent);

      } else if(this.commonDialog.refund.curtype == "餐费退费"){
      	
      	this.$refs.mealrefund.init(selectStudent);
      	
      }else {
        //订金退费
        this.$refs.earnestRefund.init(selectStudent);
      }

      function getFieldByType(type) {
        if (type === 1) {
          return {
            tableSelect: [
              { propName: "courseName", labelNmae: "名称" },
              { propName: "chargeMode", labelNmae: "收费类型" },
              { propName: "useCourseHour", labelNmae: "已上课时" },
              { propName: "courseTime", labelNmae: "课程时间" },           
              { propName: "firstTimeEnd", labelNmae: "首次上课时间" },
              { propName: "courseMoney", labelNmae: "价格" },
              { propName: "teacherUserName", labelNmae: "教师" },
              { propName: "courseProgress", labelNmae: "课程进度" },
              { propName: "courseStatus", labelNmae: "状态" }
            ],
            tableResult: [
              { propName: "courseName", labelNmae: "名称" },
              { propName: "chargeMode", labelNmae: "收费模式" },
              { propName: 'payModeName', labelNmae: '收款方式' },
              { propName: "courseBuyNum", labelNmae: "购买数量" },
              { propName: "courseTimeMode", labelNmae: "单位" },
              { propName: "simpleprice", labelNmae: "课程单价" },
              { propName: "courseMoney", labelNmae: "课程总价" },
              { propName: "realMoney", labelNmae: "实际支付" },
              { propName: "useCourseHour", labelNmae: "已上课时" },
              { propName: "useCourseMoney", labelNmae: "课耗" },
              { propName: "surplusCourseHour", labelNmae: "剩余课时" },
              { propName: "surplusCourseMoney", labelNmae: "剩余课程费用" },
              { propName: "needRefundMoney", labelNmae: "应退费" }
            ]
          };
        } else if (type === 2) {
          return {
            tableSelect: [
              { propName: "courseName", labelNmae: "名称" },
              { propName: "chargeMode", labelNmae: "商品分类" },
              { propName: "useCourseHour", labelNmae: "商品单价" },
              { propName: "all", labelNmae: "购买数量" },
              { propName: "startTime", labelNmae: "总价" },
              { propName: "simpleprice", labelNmae: "实际支付" },
              { propName: "teacherUserName", labelNmae: "购买时间" }
            ],
            tableResult: [
              { propName: "courseName", labelNmae: "名称" },
              { propName: "chargeMode", labelNmae: "商品分类" },
              { propName: "useCourseHour", labelNmae: "商品单价" },
              { propName: "all", labelNmae: "购买数量" },
              { propName: "startTime", labelNmae: "总价" },
              { propName: "simpleprice", labelNmae: "实际支付" },
              { propName: "refundNum", labelNmae: "需退数量", needAdd: true },
              { propName: "ytf", labelNmae: "应退费" }
            ]
          };
        } else {
          return {
            tableSelect: [
              { propName: "courseName", labelNmae: "缴费时间" },
              { propName: "chargeMode", labelNmae: "订金" },
              { propName: "useCourseHour", labelNmae: "备注" }
            ],
            tableResult: [
              { propName: "courseName", labelNmae: "缴费时间" },
              { propName: "chargeMode", labelNmae: "订金" },
              { propName: "courseHour", labelNmae: "实际支付" },
              { propName: "simpleprice", labelNmae: "应退费" }
            ]
          };
        }
      }
    },
    /**交订金弹窗-查询按钮点击 */
    dialog_deposit_query() {
      let self = this;
      let searchname = this.commonDialog.deposit.inputtxt;

      //验证规则
      var rules = [
        {
          judge: tool.judge("empty", searchname),
          focus: this.$refs.commonDialog_enroll_inputtxt,
          tips: "关键字不可为空！"
        }
      ];
      if (!tool.validate(rules)) {
        return;
      }

      this.commonDialog.deposit.tableData = [];
      self.commonDialog.loading = true;
      api
        .clueList({
          keyword: searchname,
          campusId: this.campusId,
          type: 0,
          clueStatus: "",
          courseId: "",
          intentionMode: "",
          visitTime: "",
          remark: "",
          channelId: "",
          age: "",
          createTime: "",
          assignDate: "",
          currPage: 1,
          pageSize: 10
        })
        .then(function(data) {
          // console.log(data)/
          let clueList = data.list;
          self.commonDialog.deposit.clueDataList = clueList;
          let now = new Date();
          let year = now.getFullYear(),
            month = now.getMonth() + 1,
            day = now.getDate();
          for (let i = 0; i < clueList.length; i++) {
            let row = clueList[i];
            let phone = "";
            if (row.parentData && row.parentData.length > 0) {
              phone = row.parentData[0].phone;
            }
            //birthday "2019-02-01"
            //方法二
            let age = tool.minusDate(row.birthday);
            self.commonDialog.deposit.tableData.push({
              student:
                row.realName + "(" + (row.gender == 1 ? "男" : "女") + ")",
              age: age,
              phone: phone,
              key: i
            });
          }
          //清空上次选择
          self.commonDialog.deposit.selectClue = null;
          self.commonDialog.deposit.depositbtnDisable = true;
          self.commonDialog.loading = false;
        })
        .catch(function(e) {
          self.commonDialog.loading = false;
        });
    },
    /**交订金弹窗-表格选中 */
    dialog_deposit_handleCurrentChange(currentRow) {
      let index = currentRow.key;
      this.commonDialog.deposit.selectClue = this.commonDialog.deposit.clueDataList[
        index
      ];
      this.commonDialog.deposit.depositbtnDisable = false;
    },
    /**交订金弹窗-新增学员 */
    dialog_deposit_addstudent() {
      this.$refs.clueAdd.init();
    },
    /**交订金弹窗-报名按钮点击 */
    dialog_deposit_btnEnrollClick() {
      let payEarnest = this.$refs.payEarnest;
      payEarnest.init(this.commonDialog.deposit.selectClue);
      this.closeCommonDialog();
    },
    /**交订金弹窗-交订金返回 */
    // dialog_deposit_closePayEarnest() {debugger},
    closeGoodsBuy : function() {
    	this.updateLatestMoneyData();
    },
    closeGoodsRefund : function() {
    	this.closeCommonDialog();
    },

    closemealfeebuy :function(){
    	this.closeCommonDialog();
    },
		closemealrefund :function(){
			this.closeCommonDialog();
		},
    closeEarnestRefund : function() {

    	this.closeCommonDialog();
    }
  },
  mounted() {
    this.init();
  },
  computed: {},
  watch: {}
};
</script>

<style lang="scss">
.comprehensive {
  .content_comprehensive {
    margin: 0 auto;
    min-width: 15.48rem;
    width: 15.48rem;
    .t-title {
      position: relative;
      // left: 0.58rem;
      margin-top: 0.3rem;
      width: 15.48rem;
      font-size: 0.25rem;
      font-weight: bold;
    }
    .radioBtn {
      position: relative;
      // left: 0.58rem;
      margin-top: 0.2rem;
      width: 15.48rem;
      display: inline-flex;
      .el-button {
        width: 2.28rem;
        height: 1.3rem;
        line-height: 0.25rem;
        font-size: 0.25rem;
        margin-left: 0.37rem !important;
        // margin-right: 0rem !important;
        background: #fff;
        border: 0.01rem solid #ededed;
        border-radius: 0.1rem !important;
        box-shadow: 0 0.02rem 0.38rem 0 #3885f81f, 0 0 0.06rem 0 #3885f81f;
      }
      .el-button.first {
        margin-left: 0rem !important;
      }
      .el-button > span {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        align-items: center;
      }
      .btnIco {
        width: 0.64rem;
        height: 0.64rem;
      }
      .btnTxt {
        margin-top: 0.1rem;
        font-size: 0.2rem;
      }
    }
    .contentProcessingCenter {
      position: relative;
      // left: 0.58rem;
      margin-top: 0.14rem;
      width: 15.48rem;
      padding: 0.2rem 0rem;//0.2rem 0.32rem 0.2rem 0.32rem;
      height: auto;
      background: #fff;
      border: 0.01rem solid #ededed;
      border-radius: 0.1rem;
      box-shadow: 0 0.02rem 0.38rem 0 #3885f81f, 0 0 0.06rem 0 #3885f81f;
      overflow: hidden;
      .latesttitle {
        font-size: 0.2rem;
        color: #666666;
        margin: 0rem 0 0.1rem 0;
        background-color: #f3f6fb;
        width: 100%;
        height: 0.4rem;
        line-height: 0.4rem;
        margin-top: -0.2rem;
        padding-left: 0.32rem;
      }
      .latestTable {
        // height: 5.4rem;
        // max-height: 5.4rem !important;
        // padding: 0 0.32rem;
        // .el-table__body-wrapper {
        //   max-height: 4.92rem !important;
        // }
        // .cell {
        //   text-align: center;
        // }
      }
      .commonDialog {
        z-index: 30 !important;
        top: 0.81rem !important;
        left: 2.1rem !important;
        background-color:rgba(0,0,0,0.5) !important;
        .el-dialog {
          width: 8.55rem !important;
          .el-dialog__title{
            font-size: .22rem !important;
            color: #333333 !important;
          }
        }
        .el-dialog[aria-label="退费"] {
          width: 6rem !important;
        }
        .el-dialog[aria-label="转班"] {
          width: 6rem !important;
        }
        .enroll,
        .renew,
        .changeclass,
        .refund,
        .deposit,
        .buy {
          padding: 0 0.2rem 0 0.2rem;
        }
        .enroll,
        .renew,
        .deposit {
          .el-table {
            max-height: 2.4rem !important;
            .el-table__body-wrapper {
              max-height: 1.92rem !important;
            }
          }
        }

        .enroll {
          .el-table__body tr.current-row > td {
            background-color: #5eabf9;
          }
          .el-button {
            margin: 0.1rem;
            // width: 1rem;
          }
          .txt {
            font-size: 0.16rem;
          }
          .rowbox {
          }
          .rowbox.bottom {
            display: flex;
            justify-content: center;
            .btn {
              margin: 0.1rem 0.5rem;
            }
          }
          .inputtxt {
            width: 2.5rem;
            margin: 0.1rem;
            margin-left: 0;

          }
        }
        .renew {
          .el-table__body tr.current-row > td {
            background-color: #5eabf9;
          }
          .el-button {
            margin: 0.1rem;
            // width: 1rem;
          }
          .txt {
            font-size: 0.16rem;
          }
          .rowbox {
          }
          .rowbox.bottom {
            display: flex;
            justify-content: center;
            .btn {
              margin: 0.1rem 0.5rem;
            }
          }
          .inputtxt {
            width: 2.5rem;
            margin: 0.1rem;
            margin-left: 0;
          }
        }
        .changeclass {
          .el-button {
            margin: 0.1rem;
            // width: 1rem;
          }
          .txt {
            font-size: 0.16rem;
            margin-left: 25%;
          }
          .rowbox.bottom {
            display: flex;
            justify-content: center;
            .btn {
              margin: 0.1rem 0.5rem;
            }
          }
          .studentselect {
            font-size: 0.16rem;
            margin: 0.1rem 0 0.2rem 0;
            margin-left: 25%;
          }
          .classselect {
            font-size: 0.16rem;
            margin: 0.1rem 0 0.2rem 0;
            margin-left: 25%;
            width: 50%;
            border-top: 0.005rem solid #6666667d;
            .el-radio {
              margin-top: 0.08rem;
              display: flex;
              align-items: center;
            }
            .el-radio__label {
              font-size: 0.16rem;
              white-space: pre-line;
            }
          }
        }
        .refund {
          .typeselect {
            font-size: 0.16rem;
            margin: 0.1rem 0 0.2rem 0;
            margin-left: 25%;
            width: 50%;
          }
          .studentselect {
            font-size: 0.16rem;
            margin: 0.1rem 0 0.2rem 0;
            margin-left: 25%;
            width: 50%;
          }
          .rowbox.bottom {
            font-size: 0.16rem;
            margin: 0.1rem 0 0.2rem 0;
            margin-left: 25%;
            width: 50%;
            text-align: center;
            .el-button {
              margin: 0.1rem;
              // width: 1rem;
            }
          }
        }
        .deposit {
          .el-table__body tr.current-row > td {
            background-color: #5eabf9;
          }
          .el-button {
            margin: 0.1rem;
            // width: 1rem;
          }
          .txt {
            font-size: 0.16rem;
          }
          .rowbox {
          }
          .rowbox.bottom {
            display: flex;
            justify-content: center;
            .btn {
              margin: 0.1rem 0.5rem;
            }
          }
          .inputtxt {
            width: 2.5rem;
            margin: 0.1rem;
            margin-left: 0;
          }
        }
        .buy {
          .el-button {
            margin: 0.1rem;
            // width: 1rem;
          }
          .txt {
            font-size: 0.16rem;
            margin-left: 25%;
          }
          .rowbox.bottom {
            display: flex;
            justify-content: center;
            .btn {
              margin: 0.1rem 0.5rem;
            }
          }
          .studentselect {
            font-size: 0.16rem;
            margin: 0.1rem 0 0.2rem 0;
            margin-left: 25%;
          }
        }
      }
    }
  }

  .popup {
    z-index: 30 !important;
  }
  .refundpopup {
    .el-dialog__wrapper {
      // top: 0.81rem !important;
      // left: 2.1rem !important;
      background: rgba(0,0,0,0.5);
      // z-index: 30 !important;
    }
    // 滚动条
    .el-dialog__wrapper::-webkit-scrollbar {
      width: 0.05rem;
    }
    .el-dialog__wrapper::-webkit-scrollbar-thumb {
      border-radius: 0.5rem;
      background: #bbbbbb;
    }
    .el-dialog__wrapper::-webkit-scrollbar-track {
      background: #f2f6fc;
    }
    .el-dialog {
      width: 16rem !important;
      background-color: white !important;
      border-radius: 0.1rem !important;
      .el-dialog__header {
        .el-dialog__title {
          font-size: 0.22rem !important;
          color: #333333 !important;
          padding: 0rem 0.1rem 0rem 0.1rem;
        }
      }
      .el-dialog__body {
        font-size: 0.16rem !important;
        color: #666666 !important;
        padding: 0.2rem 0.3rem !important;
      }
    }
  }
  //鼠标悬浮
  .hoverpointer:hover {
    cursor: pointer;
  }
  // 滚动条
  .scrollbarstyle::-webkit-scrollbar {
    width: 0.05rem;
  }
  .scrollbarstyle::-webkit-scrollbar-thumb {
    border-radius: 0.5rem;
    background: #bbbbbb;
  }
  .scrollbarstyle::-webkit-scrollbar-track {
    background: #f2f6fc;
  }
  .el-table__body-wrapper::-webkit-scrollbar {
    width: 0.05rem;
  }
  .el-table__body-wrapper::-webkit-scrollbar-thumb {
    border-radius: 0.5rem;
    background: #bbbbbb;
  }
  .el-table__body-wrapper::-webkit-scrollbar-track {
    background: #f2f6fc;
  }
}
.typeselect-dropdown{
  z-index: 2004 !important;
}
</style>